package sctu.edu.java.year2016.team03.maoyuhao.day20160522.chapter6_1;

/**
 *判断字符串 "mignrikejiavabu"中i出现的次数
 * Created by cc on 2016/5/22.
 */
public class Work {

    public static void main(String[] args) {
        int m = 0;
        char a[] = {'m', 'i', 'n', 'g', 'r', 'i', 'k', 'e', 'j', 'i', 'j', 'a', 'v', 'a', 'b', 'u'};
        for (int i = 0; i < a.length; i++ ) {
            if (a[i] == 'i')
                m++;
        }
        System.out.println(m);

    }
}
